﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="banner_edit.aspx.cs" Inherits="LinkCard.AdminCP.AboutUs.banner_edit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="Stylesheet" type="text/css" href="../Uploadify/CSS/uploadify.css" />
    <script type="text/javascript" src="../Uploadify/Scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../Uploadify/Scripts/jquery.uploadify.js"></script>
    <script type="text/javascript">

        $(window).load(
    function () {
        $(".cssUploadify0").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath0").val(response);
                alert($(".cssFilePath0").val());
            }
        });
        $(".cssUploadify1").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath1").val(response);
                alert($(".cssFilePath1").val());
            }
        });

        $(".cssUploadify2").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath2").val(response);
                alert($(".cssFilePath2").val());
            }
        });

        $(".cssUploadify3").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath3").val(response);
                alert($(".cssFilePath3").val());
            }
        });

        $(".cssUploadify4").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath4").val(response);
                alert($(".cssFilePath4").val());
            }
        });

        $(".cssUploadify5").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath5").val(response);
                alert($(".cssFilePath5").val());
            }
        });

        $(".cssUploadify6").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath6").val(response);
                alert($(".cssFilePath6").val());
            }
        });

        $(".cssUploadify7").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath7").val(response);
                alert($(".cssFilePath7").val());
            }
        });

        $(".cssUploadify8").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath8").val(response);
                alert($(".cssFilePath8").val());
            }
        });
        
        $(".cssUploadify9").fileUpload({
            'uploader': '../Uploadify/Scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'BannerUpload.ashx',
            'folder': 'uploads',
            'fileDesc': 'Adv Files(JPG, PNG, GIF, SWF)',
            'fileExt': '*.jpg;*.png;*.gif;*.swf;',
            'sizeLimit': '500000000',
            'multi': true,
            'auto': true,
            'onComplete': function (event, ID, fileObj, response, data) {


                $(".cssFilePath9").val(response);
                alert($(".cssFilePath9").val());
            }
        });
    }
);

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <section id="content">
  <section class="container_12 clearfix">
    <section id="main" class="grid_12">
      <article>
        <div class="h1">Cập nhật banner</div>
        <div class="success msg" id="divSucc" runat="server">
				Cập nhật thành công! <a href="">Đóng lại.</a>
				</div>
          <table id="table1" class="gtable" >
            <thead>
              <tr>
                <th><input type="checkbox" class="checkall" /></th>
                <th>Tiêu đề</th>
                <th>Link</th>
                <th>Hiển thị</th>
                <th>Hình ảnh</th>
              </tr>
            </thead>
            <tbody>
            <asp:Repeater ID="msgList" runat="server" OnItemDataBound="msgList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td >
                                    <input type="checkbox" id="chkDelete" runat="server" />
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="txtTitle"  class="medium" ></asp:TextBox>
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="txtLink"  class="medium" ></asp:TextBox>
                                </td>
                                <td>
                                   <asp:CheckBox ID="isActive" runat="server" />
                                </td>
                               <td>
                                 <div style="display:none;"><asp:TextBox runat="server" ID="txtFilePath"></asp:TextBox>   </div>
                            <asp:FileUpload ID="uploadify" runat="server" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5">
                                     <img src="<%# _Instance["BannerFolderPath"] + DataBinder.Eval(Container.DataItem, "FilePath")  %>" width="350" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
            </tbody>
          </table>
          <div class="tablefooter clearfix">
            <div class="actions">
              <select id="ActionOption" runat="server">
                <option value="0">Cập nhật</option>
               
              </select>
              
              <asp:Button ID="btnDelete" 
                                runat="server" Text="Thực hiện"  class="button small" 
                    style="width:80px;" onclick="btnDelete_Click" />
            </div>
            
          </div>
        
      </article>
    </section>
    
  </section>
</section>
</asp:Content>
